<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增采购单位')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-purchasingunit-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">采购单位名称：</label>
                <div class="col-sm-8">
                    <input name="unitName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位法人或负责人：</label>
                <div class="col-sm-8">
                    <input name="unitManager" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">法人手机号：</label>
                <div class="col-sm-8">
                    <input name="unitManagerPhone" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位电话：</label>
                <div class="col-sm-8">
                    <input name="unitTel" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位联系人：</label>
                <div class="col-sm-8">
                    <input name="unitLink" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位联系人手机号：</label>
                <div class="col-sm-8">
                    <input name="unitLinkPhone" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位地址：</label>
                <div class="col-sm-8">
                    <input name="unitAddress" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">开户行名称：</label>
                <div class="col-sm-8">
                    <input id="blankName" name="blankName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">开户行账号：</label>
                <div class="col-sm-8">
                    <input id="blankAccount" name="blankAccount" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位账号：</label>
                <div class="col-sm-8">
                    <input id="account" name="account" class="form-control" type="text">
                </div>
            </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">登录密码：</label>
                    <div class="col-sm-8">
                        <div class="input-group">
                            <input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.purchasingUnit.initPassword')}" required>
                            <span class="input-group-addon" title="登录密码,鼠标按下显示密码"
                                  onmousedown="$('#password').attr('type','text')"
                                  onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
                        </div>
                    </div>
                </div>



        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/purchasingunit"
        $("#form-purchasingunit-add").validate({
            onkeyup: false,
            rules:{

                password:{
                    minlength: 5,
                    maxlength: 20
                },

            },

            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-purchasingunit-add').serialize());
            }
        }


    </script>
</body>
</html>